﻿using System.Web.Mvc;
using IntroMVC4.Common;
namespace IntroMVC4.Areas.AnnaKids
{
    public class AnnaKidsAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "AnnaKids";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            //routes.Add("AnnaKids_domain1", new DomainRoute(
            //    "annakidsshop.net",                                     // Domain with parameters
            //    "",                                        // URL with parameters
            //    new { areas = "AnnaKids", controller = "HomeAN", action = "Index", id = UrlParameter.Optional }  // Parameter defaults
            //));
            //context.MapRoute(
            //    "AnnaKids_default2",
            //    "AnnaKids/{controller}/{action}/{sku}",
            //    new { controller = "Admin", action = "SuaSanPham" },
            //    namespaces: new[] { "IntroMVC4.Areas.AnnaKids.Controllers" }
            //);
            //context.MapRoute(
            //    "AnnaKids_default1",
            //    "AnnaKids/{controller}/{action}/{id}",
            //    new { controller = "TrangChu", action = "Index", id = UrlParameter.Optional },
            //    namespaces: new[] { "IntroMVC4.Areas.AnnaKids.Controllers" }
            //);

            context.MapRoute(
            "AnnaKids_defaulta",
            "annakidsshop.com",
            "Admin/{action}/{sku}",
            new { controller = "Admin", action = "SuaSanPham" },
            null,
            namespaces: new[] { "IntroMVC4.Areas.AnnaKids.Controllers" });

            
            context.MapRoute(
            "AnnaKids_defaultb",
            "annakidsshop.com",
            "{controller}/{action}/{id}",
            new { controller = "TrangChu", action = "Index", id = UrlParameter.Optional },
            null,
            namespaces: new[] { "IntroMVC4.Areas.AnnaKids.Controllers" });
        }
    }
}